Skip to content

Conversation

@mu1f407
Copy link

@mu1f407 mu1f407 commented Nov 17, 2023

Hi, this PR adds support for ECS task role credentials (see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) with --ecs-creds option or ecs-import-creds helper.

I modified get_key_value function to use sed for improvised JSON parsing, because it couldn't handle non pretty-printed JSON responses. I tested the sed variant for all cases (compact, pretty-printed, with space after colon). If the value doesn't contain double quotes, than it will work well (this would break even the original grep+cut variant).

There are some other minor changes for consistency.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant